home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / fsck.z / fsck
Encoding:
Text File  |  1998-10-20  |  12.6 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ffffsssscccckkkk((((1111MMMM))))                                                              ffffsssscccckkkk((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      fsck - check and repair filesystems for EFS
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////eeeettttcccc////ffffsssscccckkkk [----cccc] [----ffff] [----gggg] [----mmmm] [----nnnn] [----qqqq] [----yyyy] [----llll dir] [filesystems]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _f_s_c_k is applicable only to EFS filesystems.  To repair XFS filesystems,
  16.      see xfs_repair(1M).
  17.  
  18.      _f_s_c_k audits and repairs inconsistent conditions for filesystems.  You
  19.      must have both read and write permission for the device containing the
  20.      filesystem unless you give the ----nnnn flag, in which case only read
  21.      permission is required.
  22.  
  23.      If the filesystem is inconsistent, you are normally prompted for
  24.      concurrence before each correction is attempted.  Most corrective actions
  25.      result in some loss of data.  The amount and severity of data loss can be
  26.      determined from the diagnostic output.  The default action for each
  27.      correction is to wait for you to respond yyyyeeeessss or nnnnoooo.  However, certain
  28.      option flags cause _f_s_c_k to run in a non-interactive mode.
  29.  
  30.      On completion, the number of files, blocks used, and blocks free are
  31.      reported.
  32.  
  33.      NNNNooootttteeee:::: Checking the raw device is almost always faster.
  34.  
  35.      The following options are accepted by _f_s_c_k:
  36.  
  37.      ----cccc    Checks the filesystem only if the superblock indicates that it is
  38.            dirty, otherwise a message is printed saying that the filesystem is
  39.            clean and no check is performed.  The default in the absence of
  40.            this option is to always perform the check.
  41.  
  42.      ----ffff    Fast check.  Check block and sizes and check the free list.  The
  43.            free list is reconstructed if it is necessary.  No directory or
  44.            pathname checks are performed.
  45.  
  46.      ----gggg    A low risk "gentle" mode, similar to BSD preen.  Problems that do
  47.            not present any risk of data loss are fixed: these include bad link
  48.            counts, bad free list, and dirty superblock.  If any serious damage
  49.            is encountered that cannot be repaired without risk of data loss,
  50.            _f_s_c_k terminates with a warning message.
  51.  
  52.      ----llll    Allows a directory on a mounted filesystem, located elsewhere on
  53.            the system, to be specified as a salvage directory.  Unreferenced
  54.            regular files, named after their inode numbers, are copied into
  55.            this salvage directory.  This allows files to be salvaged from very
  56.            badly corrupted filesystems that may not be repairable in place --
  57.            if the root inode is lost, for example.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffsssscccckkkk((((1111MMMM))))                                                              ffffsssscccckkkk((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      ----mmmm    Forks multiple instances of _f_s_c_k to check filesystems in parallel
  75.            for improved speed.  This option is effective only when _f_s_c_k is
  76.            working from the filesystems listed in /_e_t_c/_f_s_t_a_b and is ignored if
  77.            explicit filesystem arguments are given.  Also, when this option is
  78.            specified, entries in /_e_t_c/_f_s_t_a_b with the nnnnooooaaaauuuuttttoooo option are
  79.            ignored.
  80.  
  81.      ----nnnn    Assumes a nnnnoooo response to all questions asked by _f_s_c_k; does not open
  82.            the filesystem for writing.
  83.  
  84.      ----qqqq    Quiet _f_s_c_k.  This option is effectively a version of the ----yyyy option
  85.            with less verbose output.
  86.  
  87.      ----yyyy    Assumes a yyyyeeeessss response to all questions asked by _f_s_c_k.
  88.  
  89.      If no _f_i_l_e_s_y_s_t_e_m_s are specified, _f_s_c_k reads a list of default filesystems
  90.      from the file /_e_t_c/_f_s_t_a_b.  This does not include the root filesystem;
  91.      _f_s_c_k runs on root only if this is explicitly specified.
  92.  
  93.      Normally, a filesystem must be unmounted in order to run _f_s_c_k on it, an
  94.      error message is printed and no action taken if invoked on a mounted
  95.      filesystem.  The one exception to this is the root filesystem, which must
  96.      be mounted to run _f_s_c_k.  If inconsistencies are detected when running on
  97.      root, _f_s_c_k causes a remount of root.
  98.  
  99. PPPPAAAARRRRAAAALLLLLLLLEEEELLLL OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN
  100.      When invoked with the ----mmmm flag and without explicit filesystem parameters,
  101.      _f_s_c_k scans /_e_t_c/_f_s_t_a_b and attempts to fork a check process for each eeeeffffssss
  102.      filesystem found.  These checks proceed in parallel, for improved speed.
  103.  
  104.      The name of the device holding the filesystem is printed as each check
  105.      begins.  However, to avoid confusion, the remaining output from these
  106.      parallel checks is not printed; instead it is placed in log files in the
  107.      directory /_e_t_c/_f_s_c_k_l_o_g_s.  This directory is created if it does not
  108.      currently exist.
  109.  
  110.      The log files are named after the last component of the pathname of the
  111.      device where the filesystem resides.  For example, if a filesystem was on
  112.      /_d_e_v/_d_s_k/_i_p_s_0_d_1_s_7 the logfile is named /_e_t_c/_f_s_c_k_l_o_g_s/_i_p_s_0_d_1_s_7.
  113.  
  114.      Because there is no interaction with the checks, the ----mmmm option is
  115.      accepted only in combination with another option implying non interactive
  116.      behavior:  ----yyyy or ----gggg.
  117.  
  118.      As each check completes, the name of the device is printed along with a
  119.      message indicating success or failure.  In the event of failure, the name
  120.      of the logfile containing the output from the check of that filesystem is
  121.      also printed.
  122.  
  123.      Some control over the parallelization is possible by placing _p_a_s_s_n_u_m_b_e_r_s
  124.      in /_e_t_c/_f_s_t_a_b (see _f_s_t_a_b(4)).  If pass numbers are given for filesystems,
  125.      they are checked in the order of their pass numbers.  All filesystems
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffsssscccckkkk((((1111MMMM))))                                                              ffffsssscccckkkk((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      with a given pass number are checked (in parallel, if more than one
  141.      filesystem has the same pass number) before the next highest pass number.
  142.      A missing pass number defaults to zero.  If no pass numbers are present,
  143.      all filesystems are checked simultaneously if possible.
  144.  
  145.      NNNNooootttteeee:::: In fact, _f_s_c_k takes note of the amount of memory available in the
  146.      system, and limits the number of simultaneous check processes to avoid
  147.      swapping.  If there is not enough memory to avoid swapping for a
  148.      particular filesystem, the message
  149.  
  150.           Warning - Low free memory, swapping likely
  151.  
  152.      is printed.  If this occurs when _f_s_c_k'ing the root or usr filesystem
  153.      after a crash, the crash dump is lost.  In this case the _f_s_c_k takes
  154.      longer, but the results are otherwise normal.
  155.  
  156. CCCCHHHHEEEECCCCKKKKSSSS PPPPEEEERRRRFFFFOOOORRRRMMMMEEEEDDDD
  157.      Inconsistencies checked are as follows:
  158.  
  159.      1.    Inode block addressing checks:  Too many direct or indirect
  160.            extents, extents out of order, bad magic number in extents, blocks
  161.            that are not in a legal data area of the filesystem, blocks that
  162.            are claimed by more than one inode.
  163.  
  164.      2.    Size checks:  Number of blocks claimed by inode inconsistent with
  165.            inode size, directory size not block aligned.
  166.  
  167.      3.    Directory checks:  Illegal number of entries in a directory block,
  168.            bad freespace pointer in directory block, entry pointing to
  169.            unallocated or outrange inode, overlapping entries, missing or
  170.            incorrect dot and dotdot entries.
  171.  
  172.      4.    Pathname checks:  Files or directories not referenced by a pathname
  173.            starting from the filesystem root.
  174.  
  175.      5.    Link count checks:  Link counts that do not agree with the number
  176.            of directory references to the inode.
  177.  
  178.      6.    Freemap checks:  Blocks claimed free by the freemap but also
  179.            claimed by an inode, blocks unclaimed by any inode but not
  180.            appearing in the freemap.
  181.  
  182.      7.    Super Block checks:  Total free block and/or free i-node count
  183.            incorrect.
  184.  
  185.      Orphaned files and directories (allocated but unreferenced) are, with the
  186.      your concurrence, reconnected by placing them in the _l_o_s_t+_f_o_u_n_d
  187.      directory, if the files are nonempty.  You are notified if the file or
  188.      directory is empty or not.  Empty files or directories are removed, as
  189.      long as the ----nnnn option is not specified.  _f_s_c_k forces the reconnection of
  190.      nonempty directories.  The name assigned is the i-node number.  The
  191.      directory _l_o_s_t+_f_o_u_n_d must preexist in the root of the filesystem being
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ffffsssscccckkkk((((1111MMMM))))                                                              ffffsssscccckkkk((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      checked and must have empty slots in which entries can be made.  This
  207.      directory is always created by _m_k_f_s(1M) when a filesystem is first
  208.      created.
  209.  
  210. SSSSUUUUPPPPEEEERRRRBBBBLLLLOOOOCCCCKKKKSSSS AAAANNNNDDDD FFFFIIIILLLLEEEESSSSYYYYSSSSTTTTEEEEMMMM RRRROOOOBBBBUUUUSSSSTTTTNNNNEEEESSSSSSSS
  211.      In IRIX 3.3 and later, a replicated superblock exists in the EFS
  212.      filesystem, situated at the end of the filesystem space.  If _f_s_c_k cannot
  213.      read the primary superblock it attempts to use the replicated superblock.
  214.      It prints a message to notify you of the situation.  This is automatic;
  215.      no user intervention is required.  Further, _f_s_c_k attempts to determine if
  216.      a replicated superblock exists, and if not, optionally creates one.
  217.      Thus, older filesystems benefit from this feature.
  218.  
  219.      Finally, if no superblock can be found on a damaged filesystem, it may be
  220.      possible to regenerate one by using the new ----rrrr option of _m_k_f_s(1M), and
  221.      then use _f_s_c_k to salvage the filesystem.
  222.  
  223.      WWWWaaaarrrrnnnniiiinnnngggg:::: This is nnnnooootttt effective if the filesystem was created under a
  224.      version of IRIX other than the currently running version, since _m_k_f_s
  225.      defaults have changed from release to release.
  226.  
  227. OOOOBBBBSSSSOOOOLLLLEEEETTTTEEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS
  228.      The options ----bbbb, ----DDDD, ----ssss, ----SSSS, and ----tttt, which were supported by earlier
  229.      versions of _f_s_c_k, are now obsolete.
  230.  
  231.      The ----bbbb option caused a reboot of the system when _f_s_c_k was run on the root
  232.      filesystem and errors were detected.  The behavior now is always to
  233.      remount the root filesystem in this case.
  234.  
  235.      The ----tttt option specified a scratch file for temporary storage; this is now
  236.      never required.
  237.  
  238.      The ----DDDD option added extra directory checks; these are now always done by
  239.      default.
  240.  
  241.      The ----ssss and ----SSSS options caused conditional or forced rebuild of the
  242.      freelist.  The freelist is now exhaustively checked and is always rebuilt
  243.      if necessary.
  244.  
  245.      All of these options are now legal no-ops.
  246.  
  247. FFFFIIIILLLLEEEESSSS
  248.      /etc/fstab     default list of filesystems to check
  249.  
  250. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  251.      findblk(1M), fpck(1M), mkfs(1M), ncheck(1M), uadmin(2), filesystems(4),
  252.      fstab(4).
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.